/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package model;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author pborrego
 */
@Entity
@Table(name = "BLOGGERTAGS")
@NamedQueries({@NamedQuery(name = "Bloggertags.findAll", query = "SELECT b FROM Bloggertags b"), @NamedQuery(name = "Bloggertags.findByBloggertagid", query = "SELECT b FROM Bloggertags b WHERE b.bloggertagid = :bloggertagid"), @NamedQuery(name = "Bloggertags.findByBloggerid", query = "SELECT b FROM Bloggertags b WHERE b.bloggerid = :bloggerid"), @NamedQuery(name = "Bloggertags.findByTagid", query = "SELECT b FROM Bloggertags b WHERE b.tagid = :tagid")})
public class Bloggertags implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "BLOGGERTAGID")
    private Integer bloggertagid;
    @Column(name = "BLOGGERID")
    private Integer bloggerid;
    @Column(name = "TAGID")
    private Integer tagid;

    public Bloggertags() {
    }

    public Bloggertags(Integer bloggertagid) {
        this.bloggertagid = bloggertagid;
    }

    public Integer getBloggertagid() {
        return bloggertagid;
    }

    public void setBloggertagid(Integer bloggertagid) {
        this.bloggertagid = bloggertagid;
    }

    public Integer getBloggerid() {
        return bloggerid;
    }

    public void setBloggerid(Integer bloggerid) {
        this.bloggerid = bloggerid;
    }

    public Integer getTagid() {
        return tagid;
    }

    public void setTagid(Integer tagid) {
        this.tagid = tagid;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (bloggertagid != null ? bloggertagid.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Bloggertags)) {
            return false;
        }
        Bloggertags other = (Bloggertags) object;
        if ((this.bloggertagid == null && other.bloggertagid != null) || (this.bloggertagid != null && !this.bloggertagid.equals(other.bloggertagid))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "model.Bloggertags[bloggertagid=" + bloggertagid + "]";
    }

}
